package com.cxy.services;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cxy.dao.IssuesDao;
import com.cxy.pojo.Issues;


@Service
@Transactional
public class IssuesServices {
	@Resource
	private IssuesDao issuesDao;
	@Transactional(readOnly=true)
	public List<Issues> find(){
		return issuesDao.findAll();
	}
	public void del(int id){
		issuesDao.del(id);
	}
	@Transactional(readOnly=true)
	public Issues get(int id){
		return issuesDao.findById(id);
	}
	public void saveOrUpdate(Issues issues){
		issuesDao.saveOrUpdate(issues);
	}
	public List findCountByPidAndType(int pid){
		return issuesDao.findCountByPidAndType(pid);
	}
}
